*Data & analysis for Kam - Who Toes the Party Line 
clear
use "C:\CDK WORK\published\party cues article_POL_BEH\Kam 2005 PB all vars.dta" 
drop demcell2- infobptysup
drop trssci4cat- gop4cell3
drop dem3cell2- info2catgop3cell2
drop ltotwdopenr- valencenewdisp
drop demdemco - infofignesptysup
drop nfccommon -outptycue
drop infofignesinptycue3- uninfoutptycue3
drop infofignesptysup3- nfccommontrssci
drop znfc1 znfc2 znfc nfcst
drop ptysup3
drop nfccommon*
drop infofig*
save "C:\CDK WORK\published\party cues article_POL_BEH\Kam 2005 PB all vars clean.dta" 

******FINAL RESULTS APPEARING IN TABLE 1******
oprobit foodop1 inptycue3 outptycue3 trssci if dem3cata>0 | gop3cata>0
est store table1
est table table1, b(%9.3f) se stats(ll N)
**********************************************


*ANALYSIS FOR TABLE 2
gen ptysup3 = inptycue3
replace ptysup3 = -1*(outptycue3) if inptycue3==0
gen infofignes = (info1+info3+info5+info6)/4
gen nfccommon = .
replace nfccommon = (nfc1+nfc2)/2 if pilotdata==1
tab nfccommon
replace nfccommon = (nfc1+nfc4)/2 if pilotdata==0
tab nfccommon
replace nfccommon=(nfccommon-.125)/(.875)

******FINAL RESULTS APPEARING IN TABLE 2******
gen nfccommonptysup3 = nfccommon*ptysup3
gen nfccommontrssci = nfccommon*trssci
oprobit foodop1 ptysup3 nfccommontrssci trssci nfccommonptysup3 nfccommon if dem3cata>0|gop3cata>0
est store nfc
gen infofignesptysup3 = infofignes*ptysup3
gen infofignestrssci = infofignes*trssci
oprobit foodop1 ptysup3 infofignesptysup3 trssci infofignestrssci infofignes if dem3cata>0|gop3cata>0
est store info
est table nfc info, b(%9.3f) se stats(ll N)
**********************************************
